
<!DOCTYPE html>

<html>
  
<!-- Mirrored from docs.sympy.org/latest/modules/physics/optics/polarization.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 15 Jan 2022 03:27:38 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

    <title>Polarization &#8212; SymPy 1.9 documentation</title>
    <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../../../_static/default.css" />
    <link rel="stylesheet" type="text/css" href="../../../_static/graphviz.css" />
    <link rel="stylesheet" type="text/css" href="../../../_static/plot_directive.css" />
    <link rel="stylesheet" type="text/css" href="../../../../../live.sympy.org/static/live-core.css" />
    <link rel="stylesheet" type="text/css" href="../../../../../live.sympy.org/static/live-autocomplete.css" />
    <link rel="stylesheet" type="text/css" href="../../../../../live.sympy.org/static/live-sphinx.css" />
    
    <script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
    <script src="../../../_static/jquery.js"></script>
    <script src="../../../_static/underscore.js"></script>
    <script src="../../../_static/doctools.js"></script>
    <script src="../../../../../live.sympy.org/static/utilities.js"></script>
    <script src="../../../../../live.sympy.org/static/external/classy.js"></script>
    <script src="../../../../../live.sympy.org/static/live-core.js"></script>
    <script src="../../../../../live.sympy.org/static/live-autocomplete.js"></script>
    <script src="../../../../../live.sympy.org/static/live-sphinx.js"></script>
    <script async="async" src="../../../../../cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest8331.js?config=TeX-AMS_HTML-full"></script>
    <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["\\(", "\\)"]], "displayMath": [["\\[", "\\]"]]}})</script>
    
    <link rel="shortcut icon" href="../../../_static/sympy-notailtext-favicon.ico"/>
    <link href="polarization.html" rel="canonical" />
    
    <link rel="index" title="Index" href="../../../genindex.html" />
    <link rel="search" title="Search" href="../../../search.html" />
    <link rel="next" title="Utilities" href="utils.html" />
    <link rel="prev" title="Medium" href="medium.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="utils.html" title="Utilities"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="medium.html" title="Medium"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../../index.html">SymPy 1.9 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../../index.html" >SymPy Modules Reference</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="../index.html" >Physics</a> &#187;</li>
          <li class="nav-item nav-item-3"><a href="index.html" accesskey="U">Optics Module</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="#">Polarization</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="module-sympy.physics.optics.polarization">
<span id="polarization"></span><h1>Polarization<a class="headerlink" href="#module-sympy.physics.optics.polarization" title="Permalink to this headline">¶</a></h1>
<p>The module implements routines to model the polarization of optical fields
and can be used to calculate the effects of polarization optical elements on
the fields.</p>
<ul class="simple">
<li><p>Jones vectors.</p></li>
<li><p>Stokes vectors.</p></li>
<li><p>Jones matrices.</p></li>
<li><p>Mueller matrices.</p></li>
</ul>
<section id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<p>We calculate a generic Jones vector:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">symbols</span><span class="p">,</span> <span class="n">pprint</span><span class="p">,</span> <span class="n">zeros</span><span class="p">,</span> <span class="n">simplify</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.optics.polarization</span> <span class="kn">import</span> <span class="p">(</span><span class="n">jones_vector</span><span class="p">,</span> <span class="n">stokes_vector</span><span class="p">,</span>
<span class="gp">... </span>    <span class="n">half_wave_retarder</span><span class="p">,</span> <span class="n">polarizing_beam_splitter</span><span class="p">,</span> <span class="n">jones_2_stokes</span><span class="p">)</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">psi</span><span class="p">,</span> <span class="n">chi</span><span class="p">,</span> <span class="n">p</span><span class="p">,</span> <span class="n">I0</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s2">&quot;psi, chi, p, I0&quot;</span><span class="p">,</span> <span class="n">real</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">x0</span> <span class="o">=</span> <span class="n">jones_vector</span><span class="p">(</span><span class="n">psi</span><span class="p">,</span> <span class="n">chi</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">pprint</span><span class="p">(</span><span class="n">x0</span><span class="p">,</span> <span class="n">use_unicode</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="go">⎡-ⅈ⋅sin(χ)⋅sin(ψ) + cos(χ)⋅cos(ψ)⎤</span>
<span class="go">⎢                                ⎥</span>
<span class="go">⎣ⅈ⋅sin(χ)⋅cos(ψ) + sin(ψ)⋅cos(χ) ⎦</span>
</pre></div>
</div>
<p>And the more general Stokes vector:
&gt;&gt;&gt; s0 = stokes_vector(psi, chi, p, I0)
&gt;&gt;&gt; pprint(s0, use_unicode=True)
⎡          I₀          ⎤
⎢                      ⎥
⎢I₀⋅p⋅cos(2⋅χ)⋅cos(2⋅ψ)⎥
⎢                      ⎥
⎢I₀⋅p⋅sin(2⋅ψ)⋅cos(2⋅χ)⎥
⎢                      ⎥
⎣    I₀⋅p⋅sin(2⋅χ)     ⎦</p>
<p>We calculate how the Jones vector is modified by a half-wave plate:
&gt;&gt;&gt; alpha = symbols(“alpha”, real=True)
&gt;&gt;&gt; HWP = half_wave_retarder(alpha)
&gt;&gt;&gt; x1 = simplify(HWP*x0)</p>
<p>We calculate the very common operation of passing a beam through a half-wave
plate and then through a polarizing beam-splitter. We do this by putting this
Jones vector as the first entry of a two-Jones-vector state that is transformed
by a 4x4 Jones matrix modelling the polarizing beam-splitter to get the
transmitted and reflected Jones vectors:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">PBS</span> <span class="o">=</span> <span class="n">polarizing_beam_splitter</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">X1</span> <span class="o">=</span> <span class="n">zeros</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">X1</span><span class="p">[:</span><span class="mi">2</span><span class="p">,</span> <span class="p">:]</span> <span class="o">=</span> <span class="n">x1</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">X2</span> <span class="o">=</span> <span class="n">PBS</span><span class="o">*</span><span class="n">X1</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">transmitted_port</span> <span class="o">=</span> <span class="n">X2</span><span class="p">[:</span><span class="mi">2</span><span class="p">,</span> <span class="p">:]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">reflected_port</span> <span class="o">=</span> <span class="n">X2</span><span class="p">[</span><span class="mi">2</span><span class="p">:,</span> <span class="p">:]</span>
</pre></div>
</div>
<p>This allows us to calculate how the power in both ports depends on the initial
polarization:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">transmitted_power</span> <span class="o">=</span> <span class="n">jones_2_stokes</span><span class="p">(</span><span class="n">transmitted_port</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">reflected_power</span> <span class="o">=</span> <span class="n">jones_2_stokes</span><span class="p">(</span><span class="n">reflected_port</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="n">transmitted_power</span><span class="p">)</span>
<span class="go">cos(-2*alpha + chi + psi)**2/2 + cos(2*alpha + chi - psi)**2/2</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="n">reflected_power</span><span class="p">)</span>
<span class="go">sin(-2*alpha + chi + psi)**2/2 + sin(2*alpha + chi - psi)**2/2</span>
</pre></div>
</div>
<p>Please see the description of the individual functions for further
details and examples.</p>
</section>
<section id="references">
<h2>References<a class="headerlink" href="#references" title="Permalink to this headline">¶</a></h2>
<dl class="citation">
<dt class="label" id="r615"><span class="brackets">R615</span></dt>
<dd><p><a class="reference external" href="https://en.wikipedia.org/wiki/Jones_calculus">https://en.wikipedia.org/wiki/Jones_calculus</a></p>
</dd>
<dt class="label" id="r616"><span class="brackets">R616</span></dt>
<dd><p><a class="reference external" href="https://en.wikipedia.org/wiki/Mueller_calculus">https://en.wikipedia.org/wiki/Mueller_calculus</a></p>
</dd>
<dt class="label" id="r617"><span class="brackets">R617</span></dt>
<dd><p><a class="reference external" href="https://en.wikipedia.org/wiki/Stokes_parameters">https://en.wikipedia.org/wiki/Stokes_parameters</a></p>
</dd>
</dl>
<dl class="py function">
<dt class="sig sig-object py" id="sympy.physics.optics.polarization.half_wave_retarder">
<span class="sig-prename descclassname"><span class="pre">sympy.physics.optics.polarization.</span></span><span class="sig-name descname"><span class="pre">half_wave_retarder</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">theta</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/physics/optics/polarization.py#L432-L464"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.physics.optics.polarization.half_wave_retarder" title="Permalink to this definition">¶</a></dt>
<dd><p>A half-wave retarder Jones matrix at angle <span class="math notranslate nohighlight">\(theta\)</span>.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>``theta``</strong> : numeric type or sympy Symbol</p>
<blockquote>
<div><p>The angle of the fast axis relative to the horizontal plane.</p>
</div></blockquote>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>sympy Matrix</p>
<blockquote>
<div><p>A Jones matrix representing the retarder.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<p>A generic half-wave plate.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">pprint</span><span class="p">,</span> <span class="n">symbols</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.optics.polarization</span> <span class="kn">import</span> <span class="n">half_wave_retarder</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">theta</span><span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s2">&quot;theta&quot;</span><span class="p">,</span> <span class="n">real</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">HWP</span> <span class="o">=</span> <span class="n">half_wave_retarder</span><span class="p">(</span><span class="n">theta</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">pprint</span><span class="p">(</span><span class="n">HWP</span><span class="p">,</span> <span class="n">use_unicode</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="go">⎡   ⎛     2         2   ⎞                        ⎤</span>
<span class="go">⎢-ⅈ⋅⎝- sin (θ) + cos (θ)⎠    -2⋅ⅈ⋅sin(θ)⋅cos(θ)  ⎥</span>
<span class="go">⎢                                                ⎥</span>
<span class="go">⎢                             ⎛   2         2   ⎞⎥</span>
<span class="go">⎣   -2⋅ⅈ⋅sin(θ)⋅cos(θ)     -ⅈ⋅⎝sin (θ) - cos (θ)⎠⎦</span>
</pre></div>
</div>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="sympy.physics.optics.polarization.jones_2_stokes">
<span class="sig-prename descclassname"><span class="pre">sympy.physics.optics.polarization.</span></span><span class="sig-name descname"><span class="pre">jones_2_stokes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">e</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/physics/optics/polarization.py#L300-L344"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.physics.optics.polarization.jones_2_stokes" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the Stokes vector for a Jones vector <span class="math notranslate nohighlight">\(e\)</span>.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>``e``</strong> : sympy Matrix</p>
<blockquote>
<div><p>A Jones vector.</p>
</div></blockquote>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>sympy Matrix</p>
<blockquote>
<div><p>A Jones vector.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<p>The axes on the Poincaré sphere.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">pprint</span><span class="p">,</span> <span class="n">pi</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.optics.polarization</span> <span class="kn">import</span> <span class="n">jones_vector</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.optics.polarization</span> <span class="kn">import</span> <span class="n">jones_2_stokes</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">H</span> <span class="o">=</span> <span class="n">jones_vector</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">V</span> <span class="o">=</span> <span class="n">jones_vector</span><span class="p">(</span><span class="n">pi</span><span class="o">/</span><span class="mi">2</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">D</span> <span class="o">=</span> <span class="n">jones_vector</span><span class="p">(</span><span class="n">pi</span><span class="o">/</span><span class="mi">4</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">A</span> <span class="o">=</span> <span class="n">jones_vector</span><span class="p">(</span><span class="o">-</span><span class="n">pi</span><span class="o">/</span><span class="mi">4</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">R</span> <span class="o">=</span> <span class="n">jones_vector</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">pi</span><span class="o">/</span><span class="mi">4</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">L</span> <span class="o">=</span> <span class="n">jones_vector</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="n">pi</span><span class="o">/</span><span class="mi">4</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">pprint</span><span class="p">([</span><span class="n">jones_2_stokes</span><span class="p">(</span><span class="n">e</span><span class="p">)</span> <span class="k">for</span> <span class="n">e</span> <span class="ow">in</span> <span class="p">[</span><span class="n">H</span><span class="p">,</span> <span class="n">V</span><span class="p">,</span> <span class="n">D</span><span class="p">,</span> <span class="n">A</span><span class="p">,</span> <span class="n">R</span><span class="p">,</span> <span class="n">L</span><span class="p">]],</span>
<span class="gp">... </span>        <span class="n">use_unicode</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="go">⎡⎡1⎤  ⎡1 ⎤  ⎡1⎤  ⎡1 ⎤  ⎡1⎤  ⎡1 ⎤⎤</span>
<span class="go">⎢⎢ ⎥  ⎢  ⎥  ⎢ ⎥  ⎢  ⎥  ⎢ ⎥  ⎢  ⎥⎥</span>
<span class="go">⎢⎢1⎥  ⎢-1⎥  ⎢0⎥  ⎢0 ⎥  ⎢0⎥  ⎢0 ⎥⎥</span>
<span class="go">⎢⎢ ⎥, ⎢  ⎥, ⎢ ⎥, ⎢  ⎥, ⎢ ⎥, ⎢  ⎥⎥</span>
<span class="go">⎢⎢0⎥  ⎢0 ⎥  ⎢1⎥  ⎢-1⎥  ⎢0⎥  ⎢0 ⎥⎥</span>
<span class="go">⎢⎢ ⎥  ⎢  ⎥  ⎢ ⎥  ⎢  ⎥  ⎢ ⎥  ⎢  ⎥⎥</span>
<span class="go">⎣⎣0⎦  ⎣0 ⎦  ⎣0⎦  ⎣0 ⎦  ⎣1⎦  ⎣-1⎦⎦</span>
</pre></div>
</div>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="sympy.physics.optics.polarization.jones_vector">
<span class="sig-prename descclassname"><span class="pre">sympy.physics.optics.polarization.</span></span><span class="sig-name descname"><span class="pre">jones_vector</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">psi</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">chi</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/physics/optics/polarization.py#L89-L178"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.physics.optics.polarization.jones_vector" title="Permalink to this definition">¶</a></dt>
<dd><p>A Jones vector corresponding to a polarization ellipse with <span class="math notranslate nohighlight">\(psi\)</span> tilt,
and <span class="math notranslate nohighlight">\(chi\)</span> circularity.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>``psi``</strong> : numeric type or sympy Symbol</p>
<blockquote>
<div><p>The tilt of the polarization relative to the <span class="math notranslate nohighlight">\(x\)</span> axis.</p>
</div></blockquote>
<p><strong>``chi``</strong> : numeric type or sympy Symbol</p>
<blockquote>
<div><p>The angle adjacent to the mayor axis of the polarization ellipse.</p>
</div></blockquote>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Matrix :</p>
<blockquote>
<div><p>A Jones vector.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<p>The axes on the Poincaré sphere.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">pprint</span><span class="p">,</span> <span class="n">symbols</span><span class="p">,</span> <span class="n">pi</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.optics.polarization</span> <span class="kn">import</span> <span class="n">jones_vector</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">psi</span><span class="p">,</span> <span class="n">chi</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s2">&quot;psi, chi&quot;</span><span class="p">,</span> <span class="n">real</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
</pre></div>
</div>
<p>A general Jones vector.
&gt;&gt;&gt; pprint(jones_vector(psi, chi), use_unicode=True)
⎡-ⅈ⋅sin(χ)⋅sin(ψ) + cos(χ)⋅cos(ψ)⎤
⎢                                ⎥
⎣ⅈ⋅sin(χ)⋅cos(ψ) + sin(ψ)⋅cos(χ) ⎦</p>
<p>Horizontal polarization.
&gt;&gt;&gt; pprint(jones_vector(0, 0), use_unicode=True)
⎡1⎤
⎢ ⎥
⎣0⎦</p>
<p>Vertical polarization.
&gt;&gt;&gt; pprint(jones_vector(pi/2, 0), use_unicode=True)
⎡0⎤
⎢ ⎥
⎣1⎦</p>
<p>Diagonal polarization.
&gt;&gt;&gt; pprint(jones_vector(pi/4, 0), use_unicode=True)
⎡√2⎤
⎢──⎥
⎢2 ⎥
⎢  ⎥
⎢√2⎥
⎢──⎥
⎣2 ⎦</p>
<p>Anti-diagonal polarization.
&gt;&gt;&gt; pprint(jones_vector(-pi/4, 0), use_unicode=True)
⎡ √2 ⎤
⎢ ── ⎥
⎢ 2  ⎥
⎢    ⎥
⎢-√2 ⎥
⎢────⎥
⎣ 2  ⎦</p>
<p>Right-hand circular polarization.
&gt;&gt;&gt; pprint(jones_vector(0, pi/4), use_unicode=True)
⎡ √2 ⎤
⎢ ── ⎥
⎢ 2  ⎥
⎢    ⎥
⎢√2⋅ⅈ⎥
⎢────⎥
⎣ 2  ⎦</p>
<p>Left-hand circular polarization.
&gt;&gt;&gt; pprint(jones_vector(0, -pi/4), use_unicode=True)
⎡  √2  ⎤
⎢  ──  ⎥
⎢  2   ⎥
⎢      ⎥
⎢-√2⋅ⅈ ⎥
⎢──────⎥
⎣  2   ⎦</p>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="sympy.physics.optics.polarization.linear_polarizer">
<span class="sig-prename descclassname"><span class="pre">sympy.physics.optics.polarization.</span></span><span class="sig-name descname"><span class="pre">linear_polarizer</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">theta</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/physics/optics/polarization.py#L347-L383"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.physics.optics.polarization.linear_polarizer" title="Permalink to this definition">¶</a></dt>
<dd><p>A linear polarizer Jones matrix with transmission axis at
an angle <code class="docutils literal notranslate"><span class="pre">theta</span></code>.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>``theta``</strong> : numeric type or sympy Symbol</p>
<blockquote>
<div><p>The angle of the transmission axis relative to the horizontal plane.</p>
</div></blockquote>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>sympy Matrix</p>
<blockquote>
<div><p>A Jones matrix representing the polarizer.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<p>A generic polarizer.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">pprint</span><span class="p">,</span> <span class="n">symbols</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.optics.polarization</span> <span class="kn">import</span> <span class="n">linear_polarizer</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">theta</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s2">&quot;theta&quot;</span><span class="p">,</span> <span class="n">real</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">J</span> <span class="o">=</span> <span class="n">linear_polarizer</span><span class="p">(</span><span class="n">theta</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">pprint</span><span class="p">(</span><span class="n">J</span><span class="p">,</span> <span class="n">use_unicode</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="go">⎡      2                     ⎤</span>
<span class="go">⎢   cos (θ)     sin(θ)⋅cos(θ)⎥</span>
<span class="go">⎢                            ⎥</span>
<span class="go">⎢                     2      ⎥</span>
<span class="go">⎣sin(θ)⋅cos(θ)     sin (θ)   ⎦</span>
</pre></div>
</div>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="sympy.physics.optics.polarization.mueller_matrix">
<span class="sig-prename descclassname"><span class="pre">sympy.physics.optics.polarization.</span></span><span class="sig-name descname"><span class="pre">mueller_matrix</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">J</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/physics/optics/polarization.py#L571-L644"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.physics.optics.polarization.mueller_matrix" title="Permalink to this definition">¶</a></dt>
<dd><p>The Mueller matrix corresponding to Jones matrix <span class="math notranslate nohighlight">\(J\)</span>.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>``J``</strong> : sympy Matrix</p>
<blockquote>
<div><p>A Jones matrix.</p>
</div></blockquote>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>sympy Matrix</p>
<blockquote>
<div><p>The corresponding Mueller matrix.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<p>Generic optical components.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">pprint</span><span class="p">,</span> <span class="n">symbols</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.optics.polarization</span> <span class="kn">import</span> <span class="p">(</span><span class="n">mueller_matrix</span><span class="p">,</span>
<span class="gp">... </span>    <span class="n">linear_polarizer</span><span class="p">,</span> <span class="n">half_wave_retarder</span><span class="p">,</span> <span class="n">quarter_wave_retarder</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">theta</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s2">&quot;theta&quot;</span><span class="p">,</span> <span class="n">real</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
</pre></div>
</div>
<p>A linear_polarizer
&gt;&gt;&gt; pprint(mueller_matrix(linear_polarizer(theta)), use_unicode=True)
⎡            cos(2⋅θ)      sin(2⋅θ)     ⎤
⎢  1/2       ────────      ────────    0⎥
⎢               2             2         ⎥
⎢                                       ⎥
⎢cos(2⋅θ)  cos(4⋅θ)   1    sin(4⋅θ)     ⎥
⎢────────  ──────── + ─    ────────    0⎥
⎢   2         4       4       4         ⎥
⎢                                       ⎥
⎢sin(2⋅θ)    sin(4⋅θ)    1   cos(4⋅θ)   ⎥
⎢────────    ────────    ─ - ────────  0⎥
⎢   2           4        4      4       ⎥
⎢                                       ⎥
⎣   0           0             0        0⎦</p>
<p>A half-wave plate
&gt;&gt;&gt; pprint(mueller_matrix(half_wave_retarder(theta)), use_unicode=True)
⎡1              0                           0               0 ⎤
⎢                                                             ⎥
⎢        4           2                                        ⎥
⎢0  8⋅sin (θ) - 8⋅sin (θ) + 1           sin(4⋅θ)            0 ⎥
⎢                                                             ⎥
⎢                                     4           2           ⎥
⎢0          sin(4⋅θ)           - 8⋅sin (θ) + 8⋅sin (θ) - 1  0 ⎥
⎢                                                             ⎥
⎣0              0                           0               -1⎦</p>
<p>A quarter-wave plate
&gt;&gt;&gt; pprint(mueller_matrix(quarter_wave_retarder(theta)), use_unicode=True)
⎡1       0             0            0    ⎤
⎢                                        ⎥
⎢   cos(4⋅θ)   1    sin(4⋅θ)             ⎥
⎢0  ──────── + ─    ────────    -sin(2⋅θ)⎥
⎢      2       2       2                 ⎥
⎢                                        ⎥
⎢     sin(4⋅θ)    1   cos(4⋅θ)           ⎥
⎢0    ────────    ─ - ────────  cos(2⋅θ) ⎥
⎢        2        2      2               ⎥
⎢                                        ⎥
⎣0    sin(2⋅θ)     -cos(2⋅θ)        0    ⎦</p>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="sympy.physics.optics.polarization.phase_retarder">
<span class="sig-prename descclassname"><span class="pre">sympy.physics.optics.polarization.</span></span><span class="sig-name descname"><span class="pre">phase_retarder</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">theta</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">delta</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/physics/optics/polarization.py#L386-L429"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.physics.optics.polarization.phase_retarder" title="Permalink to this definition">¶</a></dt>
<dd><p>A phase retarder Jones matrix with retardance <span class="math notranslate nohighlight">\(delta\)</span> at angle <span class="math notranslate nohighlight">\(theta\)</span>.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>``theta``</strong> : numeric type or sympy Symbol</p>
<blockquote>
<div><p>The angle of the fast axis relative to the horizontal plane.</p>
</div></blockquote>
<p><strong>``delta``</strong> : numeric type or sympy Symbol</p>
<blockquote>
<div><p>The phase difference between the fast and slow axes of the
transmitted light.</p>
</div></blockquote>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>sympy Matrix :</p>
<blockquote>
<div><p>A Jones matrix representing the retarder.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<p>A generic retarder.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">pprint</span><span class="p">,</span> <span class="n">symbols</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.optics.polarization</span> <span class="kn">import</span> <span class="n">phase_retarder</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">theta</span><span class="p">,</span> <span class="n">delta</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s2">&quot;theta, delta&quot;</span><span class="p">,</span> <span class="n">real</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">R</span> <span class="o">=</span> <span class="n">phase_retarder</span><span class="p">(</span><span class="n">theta</span><span class="p">,</span> <span class="n">delta</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">pprint</span><span class="p">(</span><span class="n">R</span><span class="p">,</span> <span class="n">use_unicode</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="go">⎡                          -ⅈ⋅δ               -ⅈ⋅δ               ⎤</span>
<span class="go">⎢                          ─────              ─────              ⎥</span>
<span class="go">⎢⎛ ⅈ⋅δ    2         2   ⎞    2    ⎛     ⅈ⋅δ⎞    2                ⎥</span>
<span class="go">⎢⎝ℯ   ⋅sin (θ) + cos (θ)⎠⋅ℯ       ⎝1 - ℯ   ⎠⋅ℯ     ⋅sin(θ)⋅cos(θ)⎥</span>
<span class="go">⎢                                                                ⎥</span>
<span class="go">⎢            -ⅈ⋅δ                                           -ⅈ⋅δ ⎥</span>
<span class="go">⎢            ─────                                          ─────⎥</span>
<span class="go">⎢⎛     ⅈ⋅δ⎞    2                  ⎛ ⅈ⋅δ    2         2   ⎞    2  ⎥</span>
<span class="go">⎣⎝1 - ℯ   ⎠⋅ℯ     ⋅sin(θ)⋅cos(θ)  ⎝ℯ   ⋅cos (θ) + sin (θ)⎠⋅ℯ     ⎦</span>
</pre></div>
</div>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="sympy.physics.optics.polarization.polarizing_beam_splitter">
<span class="sig-prename descclassname"><span class="pre">sympy.physics.optics.polarization.</span></span><span class="sig-name descname"><span class="pre">polarizing_beam_splitter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">Tp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">Rs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">Ts</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">Rp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">phia</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">phib</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/physics/optics/polarization.py#L647-L707"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.physics.optics.polarization.polarizing_beam_splitter" title="Permalink to this definition">¶</a></dt>
<dd><p>A polarizing beam splitter Jones matrix at angle <span class="math notranslate nohighlight">\(theta\)</span>.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>``J``</strong> : sympy Matrix</p>
<blockquote>
<div><p>A Jones matrix.</p>
</div></blockquote>
<p><strong>``Tp``</strong> : numeric type or sympy Symbol</p>
<blockquote>
<div><p>The transmissivity of the P-polarized component.</p>
</div></blockquote>
<p><strong>``Rs``</strong> : numeric type or sympy Symbol</p>
<blockquote>
<div><p>The reflectivity of the S-polarized component.</p>
</div></blockquote>
<p><strong>``Ts``</strong> : numeric type or sympy Symbol</p>
<blockquote>
<div><p>The transmissivity of the S-polarized component.</p>
</div></blockquote>
<p><strong>``Rp``</strong> : numeric type or sympy Symbol</p>
<blockquote>
<div><p>The reflectivity of the P-polarized component.</p>
</div></blockquote>
<p><strong>``phia``</strong> : numeric type or sympy Symbol</p>
<blockquote>
<div><p>The phase difference between transmitted and reflected component for
output mode a.</p>
</div></blockquote>
<p><strong>``phib``</strong> : numeric type or sympy Symbol</p>
<blockquote>
<div><p>The phase difference between transmitted and reflected component for
output mode b.</p>
</div></blockquote>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>sympy Matrix</p>
<blockquote>
<div><p>A 4x4 matrix representing the PBS. This matrix acts on a 4x1 vector
whose first two entries are the Jones vector on one of the PBS ports,
and the last two entries the Jones vector on the other port.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<p>Generic polarizing beam-splitter.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">pprint</span><span class="p">,</span> <span class="n">symbols</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.optics.polarization</span> <span class="kn">import</span> <span class="n">polarizing_beam_splitter</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Ts</span><span class="p">,</span> <span class="n">Rs</span><span class="p">,</span> <span class="n">Tp</span><span class="p">,</span> <span class="n">Rp</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="sa">r</span><span class="s2">&quot;Ts, Rs, Tp, Rp&quot;</span><span class="p">,</span> <span class="n">positive</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">phia</span><span class="p">,</span> <span class="n">phib</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s2">&quot;phi_a, phi_b&quot;</span><span class="p">,</span> <span class="n">real</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">PBS</span> <span class="o">=</span> <span class="n">polarizing_beam_splitter</span><span class="p">(</span><span class="n">Tp</span><span class="p">,</span> <span class="n">Rs</span><span class="p">,</span> <span class="n">Ts</span><span class="p">,</span> <span class="n">Rp</span><span class="p">,</span> <span class="n">phia</span><span class="p">,</span> <span class="n">phib</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">pprint</span><span class="p">(</span><span class="n">PBS</span><span class="p">,</span> <span class="n">use_unicode</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="go">[   ____                           ____                    ]</span>
<span class="go">[ \/ Tp            0           I*\/ Rp           0         ]</span>
<span class="go">[                                                          ]</span>
<span class="go">[                  ____                       ____  I*phi_a]</span>
<span class="go">[   0            \/ Ts            0      -I*\/ Rs *e       ]</span>
<span class="go">[                                                          ]</span>
<span class="go">[    ____                         ____                     ]</span>
<span class="go">[I*\/ Rp           0            \/ Tp            0         ]</span>
<span class="go">[                                                          ]</span>
<span class="go">[               ____  I*phi_b                    ____      ]</span>
<span class="go">[   0      -I*\/ Rs *e            0            \/ Ts       ]</span>
</pre></div>
</div>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="sympy.physics.optics.polarization.quarter_wave_retarder">
<span class="sig-prename descclassname"><span class="pre">sympy.physics.optics.polarization.</span></span><span class="sig-name descname"><span class="pre">quarter_wave_retarder</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">theta</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/physics/optics/polarization.py#L467-L503"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.physics.optics.polarization.quarter_wave_retarder" title="Permalink to this definition">¶</a></dt>
<dd><p>A quarter-wave retarder Jones matrix at angle <span class="math notranslate nohighlight">\(theta\)</span>.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>``theta``</strong> : numeric type or sympy Symbol</p>
<blockquote>
<div><p>The angle of the fast axis relative to the horizontal plane.</p>
</div></blockquote>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>sympy Matrix</p>
<blockquote>
<div><p>A Jones matrix representing the retarder.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<p>A generic quarter-wave plate.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">pprint</span><span class="p">,</span> <span class="n">symbols</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.optics.polarization</span> <span class="kn">import</span> <span class="n">quarter_wave_retarder</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">theta</span><span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s2">&quot;theta&quot;</span><span class="p">,</span> <span class="n">real</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">QWP</span> <span class="o">=</span> <span class="n">quarter_wave_retarder</span><span class="p">(</span><span class="n">theta</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">pprint</span><span class="p">(</span><span class="n">QWP</span><span class="p">,</span> <span class="n">use_unicode</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="go">⎡                       -ⅈ⋅π            -ⅈ⋅π               ⎤</span>
<span class="go">⎢                       ─────           ─────              ⎥</span>
<span class="go">⎢⎛     2         2   ⎞    4               4                ⎥</span>
<span class="go">⎢⎝ⅈ⋅sin (θ) + cos (θ)⎠⋅ℯ       (1 - ⅈ)⋅ℯ     ⋅sin(θ)⋅cos(θ)⎥</span>
<span class="go">⎢                                                          ⎥</span>
<span class="go">⎢         -ⅈ⋅π                                        -ⅈ⋅π ⎥</span>
<span class="go">⎢         ─────                                       ─────⎥</span>
<span class="go">⎢           4                  ⎛   2           2   ⎞    4  ⎥</span>
<span class="go">⎣(1 - ⅈ)⋅ℯ     ⋅sin(θ)⋅cos(θ)  ⎝sin (θ) + ⅈ⋅cos (θ)⎠⋅ℯ     ⎦</span>
</pre></div>
</div>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="sympy.physics.optics.polarization.reflective_filter">
<span class="sig-prename descclassname"><span class="pre">sympy.physics.optics.polarization.</span></span><span class="sig-name descname"><span class="pre">reflective_filter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">R</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/physics/optics/polarization.py#L539-L568"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.physics.optics.polarization.reflective_filter" title="Permalink to this definition">¶</a></dt>
<dd><p>A reflective filter Jones matrix with reflectance <span class="math notranslate nohighlight">\(R\)</span>.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>``R``</strong> : numeric type or sympy Symbol</p>
<blockquote>
<div><p>The reflectance of the filter.</p>
</div></blockquote>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>sympy Matrix</p>
<blockquote>
<div><p>A Jones matrix representing the filter.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<p>A generic filter.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">pprint</span><span class="p">,</span> <span class="n">symbols</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.optics.polarization</span> <span class="kn">import</span> <span class="n">reflective_filter</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">R</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s2">&quot;R&quot;</span><span class="p">,</span> <span class="n">real</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">pprint</span><span class="p">(</span><span class="n">reflective_filter</span><span class="p">(</span><span class="n">R</span><span class="p">),</span> <span class="n">use_unicode</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="go">⎡√R   0 ⎤</span>
<span class="go">⎢       ⎥</span>
<span class="go">⎣0   -√R⎦</span>
</pre></div>
</div>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="sympy.physics.optics.polarization.stokes_vector">
<span class="sig-prename descclassname"><span class="pre">sympy.physics.optics.polarization.</span></span><span class="sig-name descname"><span class="pre">stokes_vector</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">psi</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">chi</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">p</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">I</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/physics/optics/polarization.py#L181-L297"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.physics.optics.polarization.stokes_vector" title="Permalink to this definition">¶</a></dt>
<dd><p>A Stokes vector corresponding to a polarization ellipse with <code class="docutils literal notranslate"><span class="pre">psi</span></code>
tilt, and <code class="docutils literal notranslate"><span class="pre">chi</span></code> circularity.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>``psi``</strong> : numeric type or sympy Symbol</p>
<blockquote>
<div><p>The tilt of the polarization relative to the <code class="docutils literal notranslate"><span class="pre">x</span></code> axis.</p>
</div></blockquote>
<p><strong>``chi``</strong> : numeric type or sympy Symbol</p>
<blockquote>
<div><p>The angle adjacent to the mayor axis of the polarization ellipse.</p>
</div></blockquote>
<p><strong>``p``</strong> : numeric type or sympy Symbol</p>
<blockquote>
<div><p>The degree of polarization.</p>
</div></blockquote>
<p><strong>``I``</strong> : numeric type or sympy Symbol</p>
<blockquote>
<div><p>The intensity of the field.</p>
</div></blockquote>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Matrix :</p>
<blockquote>
<div><p>A Stokes vector.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<p>The axes on the Poincaré sphere.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">pprint</span><span class="p">,</span> <span class="n">symbols</span><span class="p">,</span> <span class="n">pi</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.optics.polarization</span> <span class="kn">import</span> <span class="n">stokes_vector</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">psi</span><span class="p">,</span> <span class="n">chi</span><span class="p">,</span> <span class="n">p</span><span class="p">,</span> <span class="n">I</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s2">&quot;psi, chi, p, I&quot;</span><span class="p">,</span> <span class="n">real</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">pprint</span><span class="p">(</span><span class="n">stokes_vector</span><span class="p">(</span><span class="n">psi</span><span class="p">,</span> <span class="n">chi</span><span class="p">,</span> <span class="n">p</span><span class="p">,</span> <span class="n">I</span><span class="p">),</span> <span class="n">use_unicode</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="go">⎡          I          ⎤</span>
<span class="go">⎢                     ⎥</span>
<span class="go">⎢I⋅p⋅cos(2⋅χ)⋅cos(2⋅ψ)⎥</span>
<span class="go">⎢                     ⎥</span>
<span class="go">⎢I⋅p⋅sin(2⋅ψ)⋅cos(2⋅χ)⎥</span>
<span class="go">⎢                     ⎥</span>
<span class="go">⎣    I⋅p⋅sin(2⋅χ)     ⎦</span>
</pre></div>
</div>
<p>Horizontal polarization
&gt;&gt;&gt; pprint(stokes_vector(0, 0), use_unicode=True)
⎡1⎤
⎢ ⎥
⎢1⎥
⎢ ⎥
⎢0⎥
⎢ ⎥
⎣0⎦</p>
<p>Vertical polarization
&gt;&gt;&gt; pprint(stokes_vector(pi/2, 0), use_unicode=True)
⎡1 ⎤
⎢  ⎥
⎢-1⎥
⎢  ⎥
⎢0 ⎥
⎢  ⎥
⎣0 ⎦</p>
<p>Diagonal polarization
&gt;&gt;&gt; pprint(stokes_vector(pi/4, 0), use_unicode=True)
⎡1⎤
⎢ ⎥
⎢0⎥
⎢ ⎥
⎢1⎥
⎢ ⎥
⎣0⎦</p>
<p>Anti-diagonal polarization
&gt;&gt;&gt; pprint(stokes_vector(-pi/4, 0), use_unicode=True)
⎡1 ⎤
⎢  ⎥
⎢0 ⎥
⎢  ⎥
⎢-1⎥
⎢  ⎥
⎣0 ⎦</p>
<p>Right-hand circular polarization
&gt;&gt;&gt; pprint(stokes_vector(0, pi/4), use_unicode=True)
⎡1⎤
⎢ ⎥
⎢0⎥
⎢ ⎥
⎢0⎥
⎢ ⎥
⎣1⎦</p>
<p>Left-hand circular polarization
&gt;&gt;&gt; pprint(stokes_vector(0, -pi/4), use_unicode=True)
⎡1 ⎤
⎢  ⎥
⎢0 ⎥
⎢  ⎥
⎢0 ⎥
⎢  ⎥
⎣-1⎦</p>
<p>Unpolarized light
&gt;&gt;&gt; pprint(stokes_vector(0, 0, 0), use_unicode=True)
⎡1⎤
⎢ ⎥
⎢0⎥
⎢ ⎥
⎢0⎥
⎢ ⎥
⎣0⎦</p>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="sympy.physics.optics.polarization.transmissive_filter">
<span class="sig-prename descclassname"><span class="pre">sympy.physics.optics.polarization.</span></span><span class="sig-name descname"><span class="pre">transmissive_filter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">T</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/physics/optics/polarization.py#L506-L536"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.physics.optics.polarization.transmissive_filter" title="Permalink to this definition">¶</a></dt>
<dd><p>An attenuator Jones matrix with transmittance <span class="math notranslate nohighlight">\(T\)</span>.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>``T``</strong> : numeric type or sympy Symbol</p>
<blockquote>
<div><p>The transmittance of the attenuator.</p>
</div></blockquote>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>sympy Matrix</p>
<blockquote>
<div><p>A Jones matrix representing the filter.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<p>A generic filter.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">pprint</span><span class="p">,</span> <span class="n">symbols</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.optics.polarization</span> <span class="kn">import</span> <span class="n">transmissive_filter</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">T</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s2">&quot;T&quot;</span><span class="p">,</span> <span class="n">real</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">NDF</span> <span class="o">=</span> <span class="n">transmissive_filter</span><span class="p">(</span><span class="n">T</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">pprint</span><span class="p">(</span><span class="n">NDF</span><span class="p">,</span> <span class="n">use_unicode</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="go">⎡√T  0 ⎤</span>
<span class="go">⎢      ⎥</span>
<span class="go">⎣0   √T⎦</span>
</pre></div>
</div>
</dd></dl>

</section>
</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../../../index.html">
              <img class="logo" src="../../../_static/sympylogo.png" alt="Logo"/>
            </a></p>
  <h3><a href="../../../index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Polarization</a><ul>
<li><a class="reference internal" href="#examples">Examples</a></li>
<li><a class="reference internal" href="#references">References</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="medium.html"
                        title="previous chapter">Medium</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="utils.html"
                        title="next chapter">Utilities</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../../../_sources/modules/physics/optics/polarization.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="https://docs.sympy.org/latest/search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="utils.html" title="Utilities"
             >next</a> |</li>
        <li class="right" >
          <a href="medium.html" title="Medium"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../../index.html">SymPy 1.9 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../../index.html" >SymPy Modules Reference</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="../index.html" >Physics</a> &#187;</li>
          <li class="nav-item nav-item-3"><a href="index.html" >Optics Module</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="#">Polarization</a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2021 SymPy Development Team.
      Last updated on Sep 30, 2021.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.1.2.
    </div>
  </body>

<!-- Mirrored from docs.sympy.org/latest/modules/physics/optics/polarization.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 15 Jan 2022 03:27:38 GMT -->
</html>